<%@ page contentType="text/html; charset=UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<%@ include file="/app/include.jsp"%>
		<script type="text/javascript">
			// 查看问卷内容
			function research(surveyuuid){
				var url = '${pageContext.request.contextPath}/data/viewResearch.do?surveyuuid=' + surveyuuid;
				Tool.showDialog(url,'回答问卷',800,600);
			}
		</script>
	</head>
	<body>
		<div class="right_content">
			<ul class="breadcrumb">
				<li>
					问卷管理
					<span>/</span>
				</li>
				<li class="active">
					我的问卷库
				</li>
			</ul>
			<div class="list-wrap">
				<form id="queryForm" name="queryForm" action="${pageContext.request.contextPath}/model/loadSurveyList.do">
					<input type="hidden" value="1"/>
					<div class="pull">
						<div class="pull-left">
							问卷标题&nbsp;<input id="name" name="name" type="text" style="width: 240px;" value="${name}"/>
						</div>
						<div class="pull-right">
							<input type="button" class="btn btn-primary" value="查询" onclick="Page.queryPage();"/>
							<input type="button" class="btn btn-primary" value="重置" onclick="Page.clearForm();"/>
						</div>
					</div>
				</form>
				<div class="table-wrap">
					<table border="0" cellpadding="0" cellspacing="0" class="list">
						<thead>
							<tr>
								<th style="width: 8%">序号</th>
								<th>问卷标题</th>
								<th style="width: 10%">问卷状态</th>
								<th style="width: 10%">样本数量</th>
								<th style="width: 12%">创建人</th>
								<th style="width: 20%">创建日期</th>
								<th style="width: 20%">操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="survey" items="${page.list}" varStatus="status">
							<tr>
								<td>${status.index + 1 }</td>
								<td><a href="#">${survey.name }</a></td>
								<td>${survey.status }</td>
								<td></td>
								<td>${survey.creatorname }</td>
								<td>${open:format(survey.createtime,"yyyy-MM-dd hh:mm:ss")}</td>
								<td>
									<a href="javascript:void(0);">数据</a>&nbsp;
									<a href="javascript:void(0);" onclick="research('${survey.surveyuuid}');">答题</a>&nbsp;
								</td>
							</tr>
							</c:forEach>
							<c:if test="${fn:length(page.list) == 0}">
								<tr>
									<td colspan=7 align="center"><font color=red><strong>没有可用的问卷模板！</strong></font></td>
								</tr>
							</c:if>
						</tbody>
					</table>
				</div>

				<!--分页开始-->
				${page.operate }
				<!--/分页结束-->
			</div>
		</div>
	</body>
</html>